package com.cn.distributor.controller;
import com.cn.common.result.Result;
import com.cn.distributor.service.DistributorService;
import com.cn.distributor.vo.EnterpriseVo;
import com.cn.distributor.vo.PersonalVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "分销商入驻")
@RestController
@RequestMapping("/back/distributor")
public class DistributorController {

    @Autowired
    private DistributorService distributorService;
    @ApiOperation("分销商入驻/企业")
    @PostMapping("/enterPrise")
    public Result enterPriseAdd(EnterpriseVo enterprise){ return distributorService.enterPriseAdd(enterprise) ; }

    @ApiOperation("分销商入驻/个人")
    @PostMapping("/personalAdd")
    public Result personalAdd(PersonalVo personal){ return distributorService.personalAdd(personal); }





}
